package com.edu.exam.entity.examination.paper.technical;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import jakarta.persistence.*;
import java.time.LocalDateTime;

/**
 * 主观题切分结果实体类
 *
 * 根据E-04-01设备适配子模块数据库设计实现
 * 存储主观题切分的详细结果数据。
 *
 * @author System
 * @version 1.0.0
 */

@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class SubjectiveQuestionSegmentationResult {

    /**
     * 结果ID，主键
     */
    @Id
    @Column(name = "result_id", length = 64)
    private String resultId;

    /**
     * 识别结果ID（外键）
     */
    @Column(name = "recognition_result_id", length = 64, nullable = false)
    private String recognitionResultId;

    /**
     * 考试ID
     */
    @Column(name = "exam_id", length = 64, nullable = false)
    private String examId;

    /**
     * 总题目数量
     */
    @Column(name = "total_questions", nullable = false)
    private Integer totalQuestions;

    /**
     * 已切分题目数量
     */
    @Column(name = "segmented_questions", nullable = false)
    private Integer segmentedQuestions;

    /**
     * 切分准确率
     */
    @Column(name = "segmentation_accuracy", precision = 5, scale = 2)
    private Double segmentationAccuracy;

    /**
     * 处理时间（毫秒）
     */
    @Column(name = "processing_time")
    private Long processingTime;

    /**
     * 创建时间
     */
    @Column(name = "created_time", nullable = false)
    private LocalDateTime createdTime;

    /**
     * 更新时间
     */
    @Column(name = "updated_time", nullable = false)
    private LocalDateTime updatedTime;

  }